var bind_post_click = function(){
    var button = e("#id-ajax-test-post")
    button.addEventListener('click', function(){
        log( "click post button")
        data = {
            "ip": "10.1.1.1",
            "username": "root",
            "password": "Huawei@123",
        }
        ajax('post', '/server/add', data, function(response){
            log(response)
        })
    })
}

var bind_get_click = function(){
    var button = e("#id-ajax-test-get")
    button.addEventListener('click', function(){
        log( "click get button")
        ajax('get', '/server', '', function(response){
            log(response)
        })
    })
}

var _bind_Events = function() {
    bind_post_click()
    bind_get_click()
}

_bind_Events()